/*    */ package com.Ticker.elements;
/*    */ 
/*    */ import java.awt.Color;
/*    */ import net.ledticker.elements.ColorModel;
/*    */ 
/*    */ public class StockColorModel
/*    */   implements ColorModel
/*    */ {
/*    */   private Color upColor;
/*    */   private Color neutralColor;
/*    */   private Color downColor;
/*    */   private Color color;
/*    */ 
/*    */   public StockColorModel()
/*    */   {
/* 17 */     this.upColor = Color.green;
/* 18 */     this.neutralColor = Color.yellow;
/* 19 */     this.downColor = Color.red;
/* 20 */     this.color = this.neutralColor;
/*    */   }
/*    */ 
/*    */   public Color getColor() {
/* 24 */     return this.color;
/*    */   }
/*    */ 
/*    */   public void setColor(Color color) {
/*    */   }
/*    */ 
/*    */   public void setUpColor(Color c) {
/* 31 */     if (this.color.equals(this.upColor)) {
/* 32 */       this.color = c;
/*    */     }
/* 34 */     this.upColor = c;
/*    */   }
/*    */ 
/*    */   public void setNeutralColor(Color c) {
/* 38 */     if (this.color.equals(this.neutralColor)) {
/* 39 */       this.color = c;
/*    */     }
/* 41 */     this.neutralColor = c;
/*    */   }
/*    */ 
/*    */   public void setDownColor(Color c) {
/* 45 */     if (this.color.equals(this.downColor)) {
/* 46 */       this.color = c;
/*    */     }
/* 48 */     this.downColor = c;
/*    */   }
/*    */ 
/*    */   public void setChangePercent(double changePercent) {
/* 52 */     if (changePercent > 0.0D)
/* 53 */       this.color = this.upColor;
/* 54 */     else if (changePercent < 0.0D)
/* 55 */       this.color = this.downColor;
/*    */     else
/* 57 */       this.color = this.neutralColor;
/*    */   }
/*    */ }

/* Location:           C:\Users\os\Downloads\TrimOnline.jar
 * Qualified Name:     Ticker.elements.StockColorModel
 * JD-Core Version:    0.5.4
 */